/*
 * 版权所有 (c) 2022-2099 TBIT。保留所有权利。
 */

package com.tbit.common.utils;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;

import java.util.Map;

/**
 * @author <a href="mailto:li.yao@tbit.com.cn">yao</a>
 * @version 4.1.0
 * @since 2024/7/12 16:25
 */
public class BeanUtils {


    public static Map<String, Object> beanToMap(final Object bean) {
        return BeanUtil.beanToMap(bean);
    }

    public static <T> T mapToBean(final Map<String, Object> map, final Class<T> beanClass) {
        return BeanUtil.mapToBean(map, beanClass, true, CopyOptions.create());
    }



}
